function judgeAccountType(account) {
    // check phone
    if (account.length == 11) {
        var regex_phone = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
        if (regex_phone.test(account)) {
            return "2";
        }
    }
    // check email
    if (account.indexOf("@") >= 0) {
        var regex_email = /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/;
        if (regex_email.test(account)) {
            return "3";
        }
    }
    // account
    return "1";
}

function checkPhoneValid(phone) {
    var result = {
        is_valid: false,
        message: ""
    };
    var regex_phone = /^(((13[0-9]{1})|(14[0-9]{1})|(17[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\d{8})$/;
    // check phone
    if (!phone) {
        result.message = "手机号码不能为空！";
    } else if (phone.length != 11) {
        result.message = "请输入有效的手机号码！";
    } else if (!regex_phone.test(phone)) {
        result.message = "请输入有效的手机号码！";
    } else {
        result.is_valid = true;
    }
    return result;
}